<?php

namespace app\model;

use app\BaseModel;
use think\model\relation\BelongsTo;
use app\model\not_del\UserModel as NotDelUserModel;

/**
 * 危机干预-记录盒子
 */
class CrisisLogModel extends BaseModel
{
    protected $name = 'crisis_log';

    /**
     * 用户名称
     * @return BelongsTo
     */
    public function userName(): BelongsTo
    {
        return $this->belongsTo(NotDelUserModel::class,'uid')->bind([
            'user_name'=>'name',
            'user_avatar'=>'avatar',
        ]);
    }
}